package d16_extends_constructor01;

public class Test {
    public static void main(String[] args) {
        //目标:子类为啥要调用分类的构造器: 初始化继承自父类部分的数据
        Teacher t1 = new Teacher();
        t1.setName("波妞");
        t1.setAge(35);
        t1.setSkill("Java,嵌入式");
        System.out.println(t1.getName());
        System.out.println(t1.getAge());
        System.out.println(t1.getSkill());

        //带参构造器,进行数据初始化
        Teacher t2 = new Teacher("陈平安",26,"我有一剑,可开山,填海,镇妖,杀魔");
        System.out.println(t2.getName());
        System.out.println(t2.getAge());
        System.out.println(t2.getSkill());
    }
}
